//获取token
var token=result.data.token
var iframe=document.createElement("iframe")
iframe.src="http://app.com"
document.body.append(iframe)
//token传入iframe
setTimeout(function(){
    iframe.contentWindow.postMessage(token,"http://app.com");
}, 4000);
setTimeout(function(){
    iframe.remove()
},6000)
//事件监听 写入本地
window.addEventListener('message',function(event){
    localStorage.setItem('token',event.data)
},false)

